<?php
/*
 * This file is using woocommerce hooks to change quary of every element in woocommerce templates
 * (ex. single product page) which one can not be change throug woocommerce templates in woocommerce folder.
 */

//Change position of the price
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price' );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 25);
//Sorting slector
remove_action( 'woocommerce_pagination', 'woocommerce_catalog_ordering', 20 );
add_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering');

/*
 * Modifications for checkout page form
 */
add_filter( 'woocommerce_checkout_fields' , 'abee_billing_modif' );
function abee_billing_modif( $fields ) {
    unset($fields['billing']['billing_address_1']['class']);
    $fields['billing']['billing_address_1']['clear'] = 1;
    unset( $fields['billing']['billing_address_2'] );
    unset( $fields['billing']['billing_country'] );
    unset( $fields['billing']['billing_state'] );
     return $fields;
}

//add_filter( 'woocommerce_email_footer_text' , 'abee_email_footer' );
//function abee_email_footer($text){
//    str_replace('Powered by WooCommerce', 'Wspierane przez <a href="http://abee.pl/rozwijaj-swoj-biznes">Abee.pl</a> ', $text);
//    return $text;
//}

?>
